using DDD.Common.Const;
using DDD.Extensions;

namespace Identity.Resource
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var builder = WebApplication.CreateBuilder(args);
            builder.WebHost.UseUrls("http://0.0.0.0:6002");

            // Add services to the container.

            builder.Services.AddControllers();
            // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
            builder.Services.AddEndpointsApiExplorer();
            builder.Services.AddSwaggerGen();

            builder.Services.AddDefaultJwt(new JwtSchemeOption()
            {
                Scheme = AuthenticationConst.Jwt.DEFAULT,
                Issure = AuthenticationConst.Jwt.ISSURE,
                Audiance = AuthenticationConst.Jwt.AUDIANCE,
                Serect = AuthenticationConst.Jwt.SERECT
            });

            var app = builder.Build();

            // Configure the HTTP request pipeline.
            app.UseSwagger();
            app.UseSwaggerUI();

            app.UseAuthorization();


            app.MapControllers();

            app.Run();
        }
    }
}
